# 列表去重，并且从小到大排序
# list1 = []
# sum = int(input("请输入一共多少个数字："))
# n = 0
# while n<sum:
#     numb = int(input("请输入数字:"))
#     list1.append(numb)
#     n += 1

counts = {}
list1 = [1,2,45,7,8,4,15,45,24,1,2,4,45]
for i in list1:
    counts[i] = counts.get(i,0) +1
list2 = counts.items()
list3 = sorted(list2,key=lambda x:x[0])
print(list3)
numb = len(list3)
for i in range(numb):
    print(list3[i][0],end=" ")
